package com.lvy.hczn.front.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lvy.hczn.front.common.exception.UtilException;
import com.lvy.hczn.front.system.domain.business.UpOrDownPolicyHistory;
import com.lvy.hczn.front.business.mapper.UpOrDownPolicyHistoryMapper;
import com.lvy.hczn.front.business.service.UpOrDownPolicyHistoryService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class UpOrDownPolicyHistoryServiceImpl extends ServiceImpl<UpOrDownPolicyHistoryMapper, UpOrDownPolicyHistory> implements UpOrDownPolicyHistoryService {

    @Autowired
    private UpOrDownPolicyHistoryMapper upOrDownPolicyHistoryMapper;

    /**
     * @Description 物理删除，数据清理
     * @Param
     * @Author yw
     * @Date 2024/9/12 10:31
     * @Return
     **/
    @Override
    public int logicDataDelete(UpOrDownPolicyHistory upOrDownPolicyHistory) {
        if (upOrDownPolicyHistory.getCreateTime() == null || upOrDownPolicyHistory.getUpdateTime() == null) {
            throw new UtilException("参数为空");
        }
        return upOrDownPolicyHistoryMapper.logicDataDelete(upOrDownPolicyHistory);
    }
}
